﻿@{
    Layout = null;
}
<div class="panel-body" style="padding:0">
    <div class="panel panel-default">
        <div class="panel-heading"></div>
        <div class="panel-body">
            <form id="formSearch" class="form-horizontal">
                <div class="form-group">
                    <label class="control-label" for="state_search">订单状态:</label>
                    <div class="col-sm-2">
                        <select id="state_search" name="state_search" class="selectpicker show-tick form-control"></select>
                    </div>
                    <label class="control-label" for="paystate_search">支付状态:</label>
                    <div class="col-sm-2">
                        <select class="form-control" id="paystate_search">
                            <option value="-1">全部</option>
                            <option value="0">未支付</option>
                            <option value="1">已支付</option>
                        </select>
                    </div>
                    <label class="control-label" for="ordernumber_search">流水号:</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" id="ordernumber_search" placeholder="请输入订单流水号">
                    </div>
                    <div class="col-sm-2">
                        <button type="button" id="btnQueryList" class="btn btn-primary"><i class="fa fa-search"></i>查询</button>
                        <button type="button" id="btnReset" class="btn btn-primary"><i class="fa fa-remove"></i>清空</button>
                    </div>
                </div>
            </form>
            <hr />
            <div>
                <table id="orderinfo"></table>
            </div>
        </div>
    </div>
</div>

<div id="toolbar" class="btn-group">
    <button id="btnReceivingDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>接单</span></button>
    <button id="btnCancelDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>取消订单</span></button>
    <button id="btnDetailDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>详情</span></button>
</div>

@*接单、取消订单信息*@
<div class="modal fade" id="StateModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">订单:<span id="State_Head_Title">***</span>确认页面</h4>
            </div>
            <div class="modal-body">
                <form id="StateOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="state_id" name="state_id" />
                    <div class="form-group">
                        <p id="stateInfo" style="text-align: center;font-size: 20px;color: red;">该订单已经支付，您确认要取消吗？</p>
                        <div class="input-group">
                            您确认要<span id="State_Head_Title_OK">***</span>吗？
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnStateOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

@*订单详情*@
<div class="modal fade" id="DetailModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:68%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">订单信息详情</h4>
            </div>
            <div class="modal-body">
                <form id="orderDetail" class="form-horizontal">
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户名称:</span>
                            <input type="text" id="detail_merchant_name" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">用户昵称:</span>
                            <input type="text" id="detail_nickname" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">流水号:</span>
                            <input type="text" id="detail_orderumber" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">总价:</span>
                            <input type="text" id="detail_price" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">优惠价:</span>
                            <input type="text" id="detail_discountprice" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">实付价:</span>
                            <input type="text" id="detail_actpayprice" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">实际支付人民币:</span>
                            <input type="text" id="detail_actpay_rmb" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">收货地址:</span>
                            <input type="text" id="detail_address" readonly="readonly" class="form-control" />
                        </div>
                    </div>


                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">支付方式:</span>
                            <input type="text" id="detail_paymethod" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">红包类别:</span>
                            <input type="text" id="detail_redpackagetype" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">用餐人数:</span>
                            <input type="text" id="detail_numberofmeals" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">订单状态：</span>
                            <input type="text" id="detail_state" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">支付状态：</span>
                            <input type="text" id="detail_paystate" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">下单时间:</span>
                            <input type="text" id="detail_createtime" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">送达时间:</span>
                            <input type="text" id="detail_servicetime" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">订单备注:</span>
                            <input type="text" id="detail_description" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">用餐人数:</span>
                            <input type="text" id="detail_numberOfMeals" readonly="readonly" class="form-control" />
                        </div>
                    </div>

                    <div class="form-group">
                        <table class="table table-striped">
                            <caption>订单商品详情</caption>
                            <thead>
                                <tr>
                                    <th>产品名称</th>
                                    <th>产品数量</th>
                                    <th>产品价格</th>
                                </tr>
                            </thead>
                            <tbody id="tbody"></tbody>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@*语音播报导入语音*@
<audio id="audionew" src="~/Content/audio/neworder.mp3" controls="controls" hidden="true">
</audio>

<script src="~/Scripts/project/min/orderindex.min.js"></script>
<script type="text/javascript">
    $(function () {
        ml.admin.orderindex.init();
    })
</script>